<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>封停</title>
    <script src="/jquery/jquery-3.2.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style>
        *{
            margin: 0;
            padding: 0;
            background-color:rgb(243,243,243);
        }
        .box{
            width: 100%;
            height: 370px;
            margin: 0 auto;
        }
        p{
            margin-top: 50px;
        }
        #reason{
            resize:none;
        }
    </style>
</head>
<body>
<div class="box">
    <form class="layui-form">
            <div class="layui-input-inline" style="margin-top: 30px">
                <label class="layui-form-label" style="margin-left: 70px;">用户账号：</label>
                    <div class="layui-input-inline">
                        <input type="text" id="account" name="account" placeholder="请输入用户账号" class="layui-input" style="float:left">
                    </div>
             </div>

            <div class="layui-input-inline" style="margin-top: 30px">
                <label class="layui-form-label" style="margin-left: 70px;">封停天数：</label>
                <div class="layui-input-inline">
                    <input type="hidden" id="day">
                    <select name="days"  style="width: 190px; height: 38px;" id="days" lay-filter="days">
                        <option value="0"></option>
                        <option value="1">7</option>
                        <option value="2">30</option>
                        <option value="3">180</option>
                    </select>
                </div>
            </div>

            <div class="layui-input-inline" style="margin-top: 30px">
                <label class="layui-form-label" style="margin-left: 70px;">封停原因：</label>
                <div class="layui-input-inline">
                    <textarea id="reason" name="reason" placeholder="请输入封停原因" class="layui-textarea" style="width: 400px;"></textarea>
                </div>
            </div>

    </form>
</div>
<script>
    layui.use(['jquery','layer','table','form','laydate'],function(){
        var $=layui.jquery;
        var layer=layui.layer;
        var laydate=layui.laydate;
        var form=layui.form;

        form.on('select(days)',function (data) {
            $('#days').children().each(function () {
                if($(this).attr('value')==data.value){
                    $('#day').val($(this).text());
                }
            })

        })
    })
</script>
</body>
</html>